# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataCatalog.V1beta1.Model.GoogleCloudDatacatalogV1beta1SearchCatalogResult do
  @moduledoc """
  A result that appears in the response of a search request. Each result captures details of one entry that matches the search.

  ## Attributes

  *   `linkedResource` (*type:* `String.t`, *default:* `nil`) - The full name of the cloud resource the entry belongs to. See: https://cloud.google.com/apis/design/resource_names#full_resource_name. Example: * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
  *   `modifyTime` (*type:* `DateTime.t`, *default:* `nil`) - Last-modified timestamp of the entry from the managing system.
  *   `relativeResourceName` (*type:* `String.t`, *default:* `nil`) - The relative resource name of the resource in URL format. Examples: * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` * `projects/{project_id}/tagTemplates/{tag_template_id}`
  *   `searchResultSubtype` (*type:* `String.t`, *default:* `nil`) - Sub-type of the search result. This is a dot-delimited description of the resource's full type, and is the same as the value callers would provide in the "type" search facet. Examples: `entry.table`, `entry.dataStream`, `tagTemplate`.
  *   `searchResultType` (*type:* `String.t`, *default:* `nil`) - Type of the search result. This field can be used to determine which Get method to call to fetch the full resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :linkedResource => String.t() | nil,
          :modifyTime => DateTime.t() | nil,
          :relativeResourceName => String.t() | nil,
          :searchResultSubtype => String.t() | nil,
          :searchResultType => String.t() | nil
        }

  field(:linkedResource)
  field(:modifyTime, as: DateTime)
  field(:relativeResourceName)
  field(:searchResultSubtype)
  field(:searchResultType)
end

defimpl Poison.Decoder,
  for: GoogleApi.DataCatalog.V1beta1.Model.GoogleCloudDatacatalogV1beta1SearchCatalogResult do
  def decode(value, options) do
    GoogleApi.DataCatalog.V1beta1.Model.GoogleCloudDatacatalogV1beta1SearchCatalogResult.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataCatalog.V1beta1.Model.GoogleCloudDatacatalogV1beta1SearchCatalogResult do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
